<?php
namespace app\admin\validate;
use think\Validate;

class UserValidate extends Validate {
    protected $rule = [
        'username' => 'require|max:10',
        'password' => 'require|min:6',
    ];

    protected $message = [
        'username.require' => '用户名不能为空',
        'username.max' => '用户名不得超过10个字符',
        'password.require' => '密码不能为空',
        'password.min' => '密码不能少于6个字符',
    ];

}